/**
 * 页面路由配置
 */
export default [
  {
    path: '/',
    name: 'index',
    redirect: '/main',
  },
  {
    path: '/login',
    name: 'login',
    meta: {
      title: '登录'
    },
    component: () => import('@/views/Login.vue')
  },
  {
    path: '/404',
    name: '404',
    meta: {
      title: '404'
    },
    component: () => import('@/views/errorPage/404.vue')
  },
  {
    path: '/500',
    name: '500',
    meta: {
      title: '500'
    },
    component: () => import('@/views/errorPage/500.vue')
  },
  {
    path: '/main',
    name: 'main',
    meta: {
      title: '主页',
      auth: true
    },
    redirect: '/main/task-manage',
    component: () => import('@/views/Main.vue'),
    children: [
      {
        path: '/main/task-manage',
        name: 'taskManage',
        meta: {
          title: '任务管理',
          auth: true
        },
        redirect: '/main/task-manage/list',
        component: () => import('@/views/taskManage/Index.vue'),
        children: [
          {
            path: '/main/task-manage/list',
            name: 'taskList',
            meta: {
              title: '任务管理列表',
              auth: true
            },
            component: () => import('@/views/taskManage/compoents/TaskList.vue')
          }
        ]
      },
      {
        path: '/main/dispatching',
        name: 'dispatching',
        meta: {
          title: '调度监控',
          auth: true
        },
        redirect: '/main/dispatching/list',
        component: () => import('@/views/dispatching/Index.vue'),
        children: [
          {
            path: '/main/dispatching/list',
            name: 'dispatchingList',
            meta: {
              title: '任务管理列表',
              auth: true
            },
            component: () => import('@/views/dispatching/compoents/List.vue')
          },
          {
            path: '/main/dispatching/add',
            name: 'addDispatching',
            meta: {
              title: '新增任务管理',
              auth: true
            },
            component: () => import('@/views/dispatching/compoents/AddOrUpdateDispatch.vue')
          },
        ]
      },
      {
        path: '/main/config',
        name: 'config',
        meta: {
          title: '配置管理',
          auth: true
        },
        component: () => import('@/views/config/Index.vue'),
        redirect: '/main/config/system',
        children: [
          {
            name: "system",
            path:'/main/config/system',
            component: () => import('@/views/config/System.vue'),
            meta:{
              title: "系统配置",
              auth: true
            }
          },
          {
            name: "interface",
            path:'/main/config/interface',
            component: () => import('@/views/config/Interface.vue'),
            meta:{
              title: "接口配置",
              auth: true
            }
          },
          {
            name: "history",
            path:'/main/config/history',
            component: () => import('@/views/config/History.vue'),
            meta:{
              title: "记录配置",
              auth: true
            }
          }
        ]
      },

    ]
  },
]
